﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using QuanLyDuocPham.Controllers.QuanLyHeThong.DanhMuc;

namespace QuanLyDuocPham.View.QuanLyHeThong.DanhMuc
{
    /// <summary>
    /// Interaction logic for THUE_Add_View.xaml
    /// </summary>
    public partial class THUE_Add_View : Window
    {
        public THUE_Add_View()
        {
            InitializeComponent();
        }
        THUESUAT_Control thuectrl = new THUESUAT_Control();
        public delegate void added();
        public added done;
        string ma_thue;
        public string _ma_thue
        {
            set
            {
                ma_thue = value;
            }
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ma_thue = thuectrl.loadID_moi();
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            thuectrl.addData(ma_thue, txtDien_Giai, txtThue_Suat);
            txtThue_Suat.Clear();
            txtDien_Giai.Clear();
            ma_thue = thuectrl.loadID_moi();


            if (done != null)
            {
                done();
            }
        }

        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            this.Close();

        }
    }
}
